import request from '../utils/request'
/**
 * 登录
 * @param {*} param0 
 * @returns 
 */
export const logins = (obj) => {
    return request({
        url: "/api/Middle/logins",
        method: "POST",
        data: obj
    });
}
export const check_login=()=>{
    return request({
          url: "/api/Middle/Check_login",
          method: "GET" 
    })
}

/**
 * 获取用户权限
 * @returns 
 */
export const get_menus =  async () => {
    if (sessionStorage.getItem("menus")) {
        return Promise.resolve(JSON.parse(sessionStorage.getItem("menus")));
    }
    return request({
        url: "/api/Sys/Get_User_Menus",
        method: "GET",
    });
}
